﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>{#read.title}--{#config.webname}</title>
    <!--引入公共样式、脚本-->
    {#static=head /}
</head>
<body>
    {#read=article?id>10/}<!--单标签形式的read,可以在页面任何位置读取其read字段值；每个页面最多只能有一个全局read-->
    <div class="head">
        {#label=notice /}<!--引入label-->
    </div>
    <div class="navi">
        {# static=navi /}
    </div>
    <div class="main">
        <div class="location">
            当前位置：<a href="index.aspx">{#config.webname}</a>
            <!-- -->
            &gt;readTag
        </div>
        <div class="read">
            <div class="infos">
                <h3>
                    {#read.title /}<!-- 也可写成{#read.author }-->
                </h3>
                <span>作者：{# read.author /}</span><span>日期：{# TimeFormat(read.time,"MM月dd日") /}<!-- 格式化日期 -->
                </span><span>点击：{#read.view /}</span>
            </div>
            <img src="{#read.img /}" style="width: 250px; margin-left: 250px;" />
            <div class="content">
                {# SubString(read.content,500) /}
                <!-- 使用后端方法，截取指定长度-->
            </div>
            <div class="links">
                <span>上一篇： </span>
                <!--用list标签读取上一篇-->
                {#list=article ? orderby=id & desc=true & id < read.id & emptytext=没有了 & take =1}<!--此处用字段id与read参数比较 -->
                <!-- -->
                <a>{#item.title}</a>
                <!-- -->
                {#list}
                <!-- -->
                <span>下一篇：</span>
                <!--用read标签读取下一篇-->
                {#read=article ? orderby=id & desc=false & id > read.id}<!--全局read的字段可作为局部read的参数 -->
                <!--此处用字段id与read.id(read标签的一个字段)比较-->
                <!-- -->
                <a>{#read.title}</a>
                <!-- -->
                {#read}<!--必须有结尾，一个页面中只能有一个全局read -->
                <!-- -->
            </div>
        </div>
    </div>
    <div class="foot">
        {#static=foot /}<!--引入static-->
    </div>
</body>
</html>
